{% if is_granted('ROLE_USER') %}
    Logged in as {{ security.user }}
{% else %}
    Not logged in. 
{% endif %}